package silvie.resources.chrmodel.structures;

import javax.vecmath.Point3f;

/**
 * Represents the "shape position" structure used by the 0x7f05 shape positions
 * chunk: an int ID and three float coordinates.
 * 
 * @author luke
 */
public class ShapePosition {
	private int id;
	private Point3f position;

	/**
	 * ShapePosition constructor.
	 * 
	 * @param id the position's ID.
	 * @param relativePosition the position's coordinates.
	 */
	public ShapePosition(int id, Point3f relativePosition) {
		this.id = id;
		this.position = relativePosition;
	}

	public int getId() {
		return this.id;
	}

	public void offsetBy(ShapePosition anotherPosition) {
		this.position.add(anotherPosition.position);
	}

	public Point3f getPosition() {
		return this.position;
	}
}
